home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(this.active)
- {
- if(move_delay >= 0)
- {
- move_delay--;
- }
- if(this.moveble && move_delay < 0)
- {
- if(c_path <= 0)
- {
- move_direction = -1;
- }
- if(c_path >= move_path)
- {
- move_direction = 1;
- }
- if(move_direction == 1)
- {
- c_path -= move_speed;
- _X = _X + move_speed * Math.sin(move_angle * 0.017453292519943295);
- _Y = _Y - move_speed * Math.cos(move_angle * 0.017453292519943295);
- }
- if(move_direction == -1)
- {
- c_path += move_speed;
- _X = _X - move_speed * Math.sin(move_angle * 0.017453292519943295);
- _Y = _Y + move_speed * Math.cos(move_angle * 0.017453292519943295);
- }
- }
- if(this.hitTest(_root.bullet._x,_root.bullet._y,true) or this.hitTest(_root.bullet._x - 10 * Math.sin(_root.bullet._rotation * 0.017453292519943295),_root.bullet._y + 10 * Math.cos(_root.bullet._rotation * 0.017453292519943295),true) or this.hitTest(_root.bullet._x - 20 * Math.sin(_root.bullet._rotation * 0.017453292519943295),_root.bullet._y + 20 * Math.cos(_root.bullet._rotation * 0.017453292519943295),true))
- {
- if(!_root.stoned)
- {
- _root.do_sound("sHeart",true);
- rem();
- }
- }
- i = 0;
- while(i < _root.tohit.length)
- {
- if(this.active && this.hitTest(_root[_root.tohit[i]]._x,_root[_root.tohit[i]]._y,true))
- {
- _root.do_sound("sHeart",true);
- rem();
- }
- i++;
- }
- }
- }
-